<%--
  Created by IntelliJ IDEA.
  User: 小军伟
  Date: 2019/11/1
  Time: 15:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html>
<head>
    <title>主界面</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link href="${pageContext.request.contextPath}/ico/aaa.ico" rel="SHORTCUT ICON">

    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.css">

    <%--<link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.min.css">--%>
    <script src="${pageContext.request.contextPath}/js/jquery-1.12.4.js"></script>
    <script src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
</head>
<body>
<%--<shiro:hasRole name="老师">--%>
    <%--<button id="add_claz" class="btn btn-group">添加班级</button>--%>
<%--</shiro:hasRole>--%>
<button id="add_claz" class="btn btn-group">添加班级</button>
<hr>
    <%--显示班级信息--%>
    <table border="1px" cellspacing="0" class="table table-hover" style="align-content: center">
        <tr>
            <th>班级ID</th>
            <th>班级名称</th>
            <th>开班时间</th>
            <th>操作</th>
        </tr>
        <c:forEach items="${clazList}" var="claz">
            <tr>
                <td>${claz.id}</td>
                <td>${claz.clazname}</td>
                <td>${claz.time}</td>
                <td><a href="${pageContext.request.contextPath}/listStudent?clazId=${claz.id}">查询班级详细信息</a></td>
            </tr>
        </c:forEach>
    </table>
    <%--分割线--%>
    <hr>
<%--<iframe name="boxbox" id="boxbox" style="width: 60%;height:700px; align-content: center;margin-left: 20px" >--%>

<%--</iframe>--%>
<%--<iframe id="boxbox2" name="boxbox2" style="height:700px;width: 38%" >--%>

<%--</iframe>--%>
</body>
<script type="text/javascript">
    $("#add_claz").click(function () {
        <%--$("#boxbox2").attr("src","${pageContext.request.contextPath}/addClaz")--%>
        location.href="${pageContext.request.contextPath}/addClaz"
    })
</script>
</html>
